/* 
 * Copyright (C), 2016-2020, 厦门盈欣宝金融信息服务有限公司
 * Project Name :boot-parent
 * File Name: org.easytouseit.bootservlet.filter
 * Encoding UTF-8 
 * Version: 1.0 
 * Date: 2018-07-31 16:51
 * History:  
 * 1. Date: 2018-07-31
 *    Author: guojm 
 *    Modification: 新建
 * 2. ...
 */
package org.easytouseit.bootservlet.filter;

import lombok.extern.slf4j.Slf4j;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * 自定义过滤器
 *
 * @author guojm
 * @version V1.0
 * @date 2018-07-31
 */
@Slf4j
@WebFilter
public class CustomMyFilter implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        log.info("========执行自定义过滤器初始化========");
    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        log.info("========执行自定义过滤器操作========");
        filterChain.doFilter(servletRequest,servletResponse);
    }

    @Override
    public void destroy() {
        log.info("========执行自定义过滤器销毁========");
    }
}
